<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><title>strophe.js</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.4 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="strophe.js"></a>strophe.js</h1><div class=CBody><p>A JavaScript library for XMPP BOSH.</p><p>This is the JavaScript version of the Strophe library.&nbsp;  Since JavaScript has no facilities for persistent TCP connections, this library uses Bidirectional-streams Over Synchronous HTTP (BOSH) to emulate a persistent, stateful, two-way connection to an XMPP server.&nbsp;  More information on BOSH can be found in XEP 124.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#strophe.js" >strophe.js</a></td><td class=SDescription>A JavaScript library for XMPP BOSH.</td></tr><tr class="SGroup"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#$build" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">$build</a></td><td class=SDescription>Create a Strophe.Builder. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#$msg" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">$msg</a></td><td class=SDescription>Create a Strophe.Builder with a &lt;message/&gt; element as the root.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#$iq" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">$iq</a></td><td class=SDescription>Create a Strophe.Builder with an &lt;iq/&gt; element as the root.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#$pres" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">$pres</a></td><td class=SDescription>Create a Strophe.Builder with a &lt;presence/&gt; element as the root.</td></tr><tr class="SClass"><td class=SEntry><a href="#Strophe" >Strophe</a></td><td class=SDescription>An object container for all Strophe library functions.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Strophe.Constants" >Constants</a></td><td class=SDescription></td></tr><tr class="SConstant SIndent2 SMarked"><td class=SEntry><a href="#Strophe.XMPP_Namespace_Constants" >XMPP Namespace Constants</a></td><td class=SDescription>Common namespace constants from the XMPP RFCs and XEPs.</td></tr><tr class="SConstant SIndent2"><td class=SEntry><a href="#Strophe.Connection_Status_Constants" >Connection Status Constants</a></td><td class=SDescription>Connection status constants for use by the connection handler callback.</td></tr><tr class="SConstant SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Log_Level_Constants" >Log Level Constants</a></td><td class=SDescription>Logging level indicators.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Strophe.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.forEachChild" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">forEachChild</a></td><td class=SDescription>Map a function over some or all child elements of a given element.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.isTagEqual" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">isTagEqual</a></td><td class=SDescription>Compare an element&rsquo;s tag name with a string.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.xmlElement" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">xmlElement</a></td><td class=SDescription>Create an XML DOM element.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.xmlTextNode" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">xmlTextNode</a></td><td class=SDescription>Creates an XML DOM text node.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.getText" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">getText</a></td><td class=SDescription>Get the concatenation of all text children of an element.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.copyElement" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">copyElement</a></td><td class=SDescription>Copy an XML DOM element.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.escapeJid" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">escapeJid</a></td><td class=SDescription>Escape a JID.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.unescapeJid" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">unescapeJid</a></td><td class=SDescription>Unescape a JID.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.getNodeFromJid" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">getNodeFromJid</a></td><td class=SDescription>Get the node portion of a JID String.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.getDomainFromJid" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">getDomainFromJid</a></td><td class=SDescription>Get the domain portion of a JID String.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.getResourceFromJid" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">getResourceFromJid</a></td><td class=SDescription>Get the resource portion of a JID String.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.getBareJidFromJid" id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')">getBareJidFromJid</a></td><td class=SDescription>Get the bare JID from a JID String.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.log" id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')">log</a></td><td class=SDescription>User overrideable logging function.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.debug" id=link18 onMouseOver="ShowTip(event, 'tt18', 'link18')" onMouseOut="HideTip('tt18')">debug</a></td><td class=SDescription>Log a message at the Strophe.LogLevel.DEBUG level.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.info" id=link19 onMouseOver="ShowTip(event, 'tt19', 'link19')" onMouseOut="HideTip('tt19')">info</a></td><td class=SDescription>Log a message at the Strophe.LogLevel.INFO level.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.warn" id=link20 onMouseOver="ShowTip(event, 'tt20', 'link20')" onMouseOut="HideTip('tt20')">warn</a></td><td class=SDescription>Log a message at the Strophe.LogLevel.WARN level.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.error" id=link21 onMouseOver="ShowTip(event, 'tt21', 'link21')" onMouseOut="HideTip('tt21')">error</a></td><td class=SDescription>Log a message at the Strophe.LogLevel.ERROR level.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.fatal" id=link22 onMouseOver="ShowTip(event, 'tt22', 'link22')" onMouseOut="HideTip('tt22')">fatal</a></td><td class=SDescription>Log a message at the Strophe.LogLevel.FATAL level.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.serialize" id=link23 onMouseOver="ShowTip(event, 'tt23', 'link23')" onMouseOut="HideTip('tt23')">serialize</a></td><td class=SDescription>Render a DOM element and all descendants to a String.</td></tr><tr class="SClass"><td class=SEntry><a href="#Strophe.Builder" >Strophe.<wbr>Builder</a></td><td class=SDescription>XML DOM builder.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Strophe.Builder.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Builder.Strophe.Builder" id=link24 onMouseOver="ShowTip(event, 'tt24', 'link24')" onMouseOut="HideTip('tt24')">Strophe.<wbr>Builder</a></td><td class=SDescription>Create a Strophe.Builder object.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.Builder.tree" id=link25 onMouseOver="ShowTip(event, 'tt25', 'link25')" onMouseOut="HideTip('tt25')">tree</a></td><td class=SDescription>Return the DOM tree.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Builder.toString" id=link26 onMouseOver="ShowTip(event, 'tt26', 'link26')" onMouseOut="HideTip('tt26')">toString</a></td><td class=SDescription>Serialize the DOM tree to a String.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.Builder.up" id=link27 onMouseOver="ShowTip(event, 'tt27', 'link27')" onMouseOut="HideTip('tt27')">up</a></td><td class=SDescription>Make the current parent element the new current element.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Builder.attrs" id=link28 onMouseOver="ShowTip(event, 'tt28', 'link28')" onMouseOut="HideTip('tt28')">attrs</a></td><td class=SDescription>Add or modify attributes of the current element.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.Builder.c" id=link29 onMouseOver="ShowTip(event, 'tt29', 'link29')" onMouseOut="HideTip('tt29')">c</a></td><td class=SDescription>Add a child to the current element and make it the new current element.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Builder.cnode" id=link30 onMouseOver="ShowTip(event, 'tt30', 'link30')" onMouseOut="HideTip('tt30')">cnode</a></td><td class=SDescription>Add a child to the current element and make it the new current element.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.Builder.t" id=link31 onMouseOver="ShowTip(event, 'tt31', 'link31')" onMouseOut="HideTip('tt31')">t</a></td><td class=SDescription>Add a child text element.</td></tr><tr class="SClass"><td class=SEntry><a href="#Strophe.Connection" >Strophe.<wbr>Connection</a></td><td class=SDescription>XMPP Connection manager.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Strophe.Connection.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Connection.Strophe.Connection" id=link32 onMouseOver="ShowTip(event, 'tt32', 'link32')" onMouseOut="HideTip('tt32')">Strophe.<wbr>Connection</a></td><td class=SDescription>Create and initialize a Strophe.Connection object.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.Connection.reset" id=link33 onMouseOver="ShowTip(event, 'tt33', 'link33')" onMouseOut="HideTip('tt33')">reset</a></td><td class=SDescription>Reset the connection.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Connection.getUniqueId" id=link34 onMouseOver="ShowTip(event, 'tt34', 'link34')" onMouseOut="HideTip('tt34')">getUniqueId</a></td><td class=SDescription>Generate a unique ID for use in &lt;iq/&gt; elements.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.Connection.connect" id=link35 onMouseOver="ShowTip(event, 'tt35', 'link35')" onMouseOut="HideTip('tt35')">connect</a></td><td class=SDescription>Starts the connection process.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Connection.rawInput" id=link36 onMouseOver="ShowTip(event, 'tt36', 'link36')" onMouseOut="HideTip('tt36')">rawInput</a></td><td class=SDescription>User overrideable function that receives raw data coming into the connection.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.Connection.rawOutput" id=link37 onMouseOver="ShowTip(event, 'tt37', 'link37')" onMouseOut="HideTip('tt37')">rawOutput</a></td><td class=SDescription>User overrideable function that receives raw data sent to the connection.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Connection.send" id=link38 onMouseOver="ShowTip(event, 'tt38', 'link38')" onMouseOut="HideTip('tt38')">send</a></td><td class=SDescription>Send a stanza.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.Connection.addTimedHandler" id=link39 onMouseOver="ShowTip(event, 'tt39', 'link39')" onMouseOut="HideTip('tt39')">addTimedHandler</a></td><td class=SDescription>Add a timed handler to the connection.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Connection.deleteTimedHandler" id=link40 onMouseOver="ShowTip(event, 'tt40', 'link40')" onMouseOut="HideTip('tt40')">deleteTimedHandler</a></td><td class=SDescription>Delete a timed handler for a connection.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.Connection.addHandler" id=link41 onMouseOver="ShowTip(event, 'tt41', 'link41')" onMouseOut="HideTip('tt41')">addHandler</a></td><td class=SDescription>Add a stanza handler for the connection.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Strophe.Connection.deleteHandler" id=link42 onMouseOver="ShowTip(event, 'tt42', 'link42')" onMouseOut="HideTip('tt42')">deleteHandler</a></td><td class=SDescription>Delete a stanza handler for a connection.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Strophe.Connection.disconnect" id=link43 onMouseOver="ShowTip(event, 'tt43', 'link43')" onMouseOut="HideTip('tt43')">disconnect</a></td><td class=SDescription>Start the graceful disconnection process.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="$build"></a>$build</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function $build(</td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create a Strophe.Builder.&nbsp; This is an alias for &lsquo;new Strophe.Builder(name, attrs)&rsquo;.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) name</td><td class=CDLDescription>The root element name.</td></tr><tr><td class=CDLEntry>(Object) attrs</td><td class=CDLDescription>The attributes for the root element in object notation.</td></tr></table><h4 class=CHeading>Returns</h4><p>A new Strophe.Builder object.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="$msg"></a>$msg</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function $msg(</td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create a Strophe.Builder with a &lt;message/&gt; element as the root.</p><h4 class=CHeading>Parmaeters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(Object) attrs</td><td class=CDLDescription>The &lt;message/&gt; element attributes in object notation.</td></tr></table><h4 class=CHeading>Returns</h4><p>A new Strophe.Builder object.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="$iq"></a>$iq</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function $iq(</td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create a Strophe.Builder with an &lt;iq/&gt; element as the root.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(Object) attrs</td><td class=CDLDescription>The &lt;iq/&gt; element attributes in object notation.</td></tr></table><h4 class=CHeading>Returns</h4><p>A new Strophe.Builder object.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="$pres"></a>$pres</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function $pres(</td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create a Strophe.Builder with a &lt;presence/&gt; element as the root.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(Object) attrs</td><td class=CDLDescription>The &lt;presence/&gt; element attributes in object notation.</td></tr></table><h4 class=CHeading>Returns</h4><p>A new Strophe.Builder object.</p></div></div></div>

<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="Strophe"></a>Strophe</h2><div class=CBody><p>An object container for all Strophe library functions.</p><p>This class is just a container for all the objects and constants used in the library.&nbsp;  It is not meant to be instantiated, but to provide a namespace for library objects, constants, and functions.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#Strophe.Constants" >Constants</a></td><td class=SDescription></td></tr><tr class="SConstant SIndent1 SMarked"><td class=SEntry><a href="#Strophe.XMPP_Namespace_Constants" >XMPP Namespace Constants</a></td><td class=SDescription>Common namespace constants from the XMPP RFCs and XEPs.</td></tr><tr class="SConstant SIndent1"><td class=SEntry><a href="#Strophe.Connection_Status_Constants" >Connection Status Constants</a></td><td class=SDescription>Connection status constants for use by the connection handler callback.</td></tr><tr class="SConstant SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Log_Level_Constants" >Log Level Constants</a></td><td class=SDescription>Logging level indicators.</td></tr><tr class="SGroup"><td class=SEntry><a href="#Strophe.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.forEachChild" id=link44 onMouseOver="ShowTip(event, 'tt5', 'link44')" onMouseOut="HideTip('tt5')">forEachChild</a></td><td class=SDescription>Map a function over some or all child elements of a given element.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.isTagEqual" id=link45 onMouseOver="ShowTip(event, 'tt6', 'link45')" onMouseOut="HideTip('tt6')">isTagEqual</a></td><td class=SDescription>Compare an element&rsquo;s tag name with a string.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.xmlElement" id=link46 onMouseOver="ShowTip(event, 'tt7', 'link46')" onMouseOut="HideTip('tt7')">xmlElement</a></td><td class=SDescription>Create an XML DOM element.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.xmlTextNode" id=link47 onMouseOver="ShowTip(event, 'tt8', 'link47')" onMouseOut="HideTip('tt8')">xmlTextNode</a></td><td class=SDescription>Creates an XML DOM text node.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.getText" id=link48 onMouseOver="ShowTip(event, 'tt9', 'link48')" onMouseOut="HideTip('tt9')">getText</a></td><td class=SDescription>Get the concatenation of all text children of an element.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.copyElement" id=link49 onMouseOver="ShowTip(event, 'tt10', 'link49')" onMouseOut="HideTip('tt10')">copyElement</a></td><td class=SDescription>Copy an XML DOM element.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.escapeJid" id=link50 onMouseOver="ShowTip(event, 'tt11', 'link50')" onMouseOut="HideTip('tt11')">escapeJid</a></td><td class=SDescription>Escape a JID.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.unescapeJid" id=link51 onMouseOver="ShowTip(event, 'tt12', 'link51')" onMouseOut="HideTip('tt12')">unescapeJid</a></td><td class=SDescription>Unescape a JID.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.getNodeFromJid" id=link52 onMouseOver="ShowTip(event, 'tt13', 'link52')" onMouseOut="HideTip('tt13')">getNodeFromJid</a></td><td class=SDescription>Get the node portion of a JID String.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.getDomainFromJid" id=link53 onMouseOver="ShowTip(event, 'tt14', 'link53')" onMouseOut="HideTip('tt14')">getDomainFromJid</a></td><td class=SDescription>Get the domain portion of a JID String.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.getResourceFromJid" id=link54 onMouseOver="ShowTip(event, 'tt15', 'link54')" onMouseOut="HideTip('tt15')">getResourceFromJid</a></td><td class=SDescription>Get the resource portion of a JID String.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.getBareJidFromJid" id=link55 onMouseOver="ShowTip(event, 'tt16', 'link55')" onMouseOut="HideTip('tt16')">getBareJidFromJid</a></td><td class=SDescription>Get the bare JID from a JID String.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.log" id=link56 onMouseOver="ShowTip(event, 'tt17', 'link56')" onMouseOut="HideTip('tt17')">log</a></td><td class=SDescription>User overrideable logging function.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.debug" id=link57 onMouseOver="ShowTip(event, 'tt18', 'link57')" onMouseOut="HideTip('tt18')">debug</a></td><td class=SDescription>Log a message at the Strophe.LogLevel.DEBUG level.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.info" id=link58 onMouseOver="ShowTip(event, 'tt19', 'link58')" onMouseOut="HideTip('tt19')">info</a></td><td class=SDescription>Log a message at the Strophe.LogLevel.INFO level.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.warn" id=link59 onMouseOver="ShowTip(event, 'tt20', 'link59')" onMouseOut="HideTip('tt20')">warn</a></td><td class=SDescription>Log a message at the Strophe.LogLevel.WARN level.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.error" id=link60 onMouseOver="ShowTip(event, 'tt21', 'link60')" onMouseOut="HideTip('tt21')">error</a></td><td class=SDescription>Log a message at the Strophe.LogLevel.ERROR level.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.fatal" id=link61 onMouseOver="ShowTip(event, 'tt22', 'link61')" onMouseOut="HideTip('tt22')">fatal</a></td><td class=SDescription>Log a message at the Strophe.LogLevel.FATAL level.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.serialize" id=link62 onMouseOver="ShowTip(event, 'tt23', 'link62')" onMouseOut="HideTip('tt23')">serialize</a></td><td class=SDescription>Render a DOM element and all descendants to a String.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Strophe.Constants"></a>Constants</h3></div></div>

<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="Strophe.XMPP_Namespace_Constants"></a>XMPP Namespace Constants</h3><div class=CBody><p>Common namespace constants from the XMPP RFCs and XEPs.</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.HTTPBIND"></a>NS.HTTPBIND</td><td class=CDLDescription>HTTP BIND namespace from XEP 124.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.CLIENT"></a>NS.CLIENT</td><td class=CDLDescription>Main XMPP client namespace.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.AUTH"></a>NS.AUTH</td><td class=CDLDescription>Legacy authentication namespace.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.ROSTER"></a>NS.ROSTER</td><td class=CDLDescription>Roster operations namespace.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.PROFILE"></a>NS.PROFILE</td><td class=CDLDescription>Profile namespace.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.DISCO_INFO"></a>NS.DISCO_INFO</td><td class=CDLDescription>Service discovery info namespace from XEP 30.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.DISCO_ITEMS"></a>NS.DISCO_ITEMS</td><td class=CDLDescription>Service discovery items namespace from XEP 30.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.MUC"></a>NS.MUC</td><td class=CDLDescription>Multi-User Chat namespace from XEP 45.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.SASL"></a>NS.SASL</td><td class=CDLDescription>XMPP SASL namespace from RFC 3920.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.STREAM"></a>NS.STREAM</td><td class=CDLDescription>XMPP Streams namespace from RFC 3920.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.BIND"></a>NS.BIND</td><td class=CDLDescription>XMPP Binding namespace from RFC 3920.</td></tr><tr><td class=CDLEntry><a name="Strophe.XMPP_Namespace_Constants.NS.SESSION"></a>NS.SESSION</td><td class=CDLDescription>XMPP Session namespace from RFC 3920.</td></tr></table></div></div></div>

<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection_Status_Constants"></a>Connection Status Constants</h3><div class=CBody><p>Connection status constants for use by the connection handler callback.</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry><a name="Strophe.Connection_Status_Constants.Status.ERROR"></a>Status.ERROR</td><td class=CDLDescription>An error has occurred</td></tr><tr><td class=CDLEntry><a name="Strophe.Connection_Status_Constants.Status.CONNECTING"></a>Status.CONNECTING</td><td class=CDLDescription>The connection is currently being made</td></tr><tr><td class=CDLEntry><a name="Strophe.Connection_Status_Constants.Status.CONNFAIL"></a>Status.CONNFAIL</td><td class=CDLDescription>The connection attempt failed</td></tr><tr><td class=CDLEntry><a name="Strophe.Connection_Status_Constants.Status.AUTHENTICATING"></a>Status.AUTHENTICATING</td><td class=CDLDescription>The connection is authenticating</td></tr><tr><td class=CDLEntry><a name="Strophe.Connection_Status_Constants.Status.AUTHFAIL"></a>Status.AUTHFAIL</td><td class=CDLDescription>The authentication attempt failed</td></tr><tr><td class=CDLEntry><a name="Strophe.Connection_Status_Constants.Status.CONNECTED"></a>Status.CONNECTED</td><td class=CDLDescription>The connection has succeeded</td></tr><tr><td class=CDLEntry><a name="Strophe.Connection_Status_Constants.Status.DISCONNECTED"></a>Status.DISCONNECTED</td><td class=CDLDescription>The connection has been terminated</td></tr><tr><td class=CDLEntry><a name="Strophe.Connection_Status_Constants.Status.DISCONNECTING"></a>Status.DISCONNECTING</td><td class=CDLDescription>The connection is currently being terminated</td></tr></table></div></div></div>

<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="Strophe.Log_Level_Constants"></a>Log Level Constants</h3><div class=CBody><p>Logging level indicators.</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry><a name="Strophe.Log_Level_Constants.LogLevel.DEBUG"></a>LogLevel.DEBUG</td><td class=CDLDescription>Debug output</td></tr><tr><td class=CDLEntry><a name="Strophe.Log_Level_Constants.LogLevel.INFO"></a>LogLevel.INFO</td><td class=CDLDescription>Informational output</td></tr><tr><td class=CDLEntry><a name="Strophe.Log_Level_Constants.LogLevel.WARN"></a>LogLevel.WARN</td><td class=CDLDescription>Warnings</td></tr><tr><td class=CDLEntry><a name="Strophe.Log_Level_Constants.LogLevel.ERROR"></a>LogLevel.ERROR</td><td class=CDLDescription>Errors</td></tr><tr><td class=CDLEntry><a name="Strophe.Log_Level_Constants.LogLevel.FATAL"></a>LogLevel.FATAL</td><td class=CDLDescription>Fatal errors</td></tr></table></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Strophe.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.forEachChild"></a>forEachChild</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>forEachChild: function (</td><td class=PParameter nowrap>elem,</td></tr><tr><td></td><td class=PParameter nowrap>elemName,</td></tr><tr><td></td><td class=PParameter nowrap>func</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Map a function over some or all child elements of a given element.</p><p>This is a small convenience function for mapping a function over some or all of the children of an element.&nbsp;  If elemName is null, all children will be passed to the function, otherwise only children whose tag names match elemName will be passed.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(XMLElement) elem</td><td class=CDLDescription>The element to operate on.</td></tr><tr><td class=CDLEntry>(String) elemName</td><td class=CDLDescription>The child element tag name filter.</td></tr><tr><td class=CDLEntry>(Function) func</td><td class=CDLDescription>The function to apply to each child.&nbsp;  This function should take a single argument, a DOM element.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.isTagEqual"></a>isTagEqual</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>isTagEqual: function (</td><td class=PParameter nowrap>el,</td></tr><tr><td></td><td class=PParameter nowrap>name</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Compare an element&rsquo;s tag name with a string.</p><p>This function is case insensitive.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(XMLElement) el</td><td class=CDLDescription>A DOM element.</td></tr><tr><td class=CDLEntry>(String) name</td><td class=CDLDescription>The element name.</td></tr></table><h4 class=CHeading>Returns</h4><p>true if the element&rsquo;s tag name matches <u>el</u>, and false otherwise.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.xmlElement"></a>xmlElement</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>xmlElement: function (</td><td class=PParameter nowrap>name</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create an XML DOM element.</p><p>This function creates an XML DOM element correctly across all implementations.&nbsp; Specifically the Microsoft implementation of document.createElement makes DOM elements with 43+ default attributes unless elements are created with the ActiveX object Microsoft.XMLDOM.</p><p>Most DOMs force element names to lowercase, so we use the _realname attribute on the created element to store the case sensitive name.&nbsp;  This is required to generate proper XML for things like vCard avatars (XEP 153).&nbsp;  This attribute is stripped out before being sent over the wire or serialized, but you may notice it during debugging.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) name</td><td class=CDLDescription>The name for the element.</td></tr><tr><td class=CDLEntry>(Array) attrs</td><td class=CDLDescription>An optional array of key/value pairs to use as element attributes in the following format [[&lsquo;key1&rsquo;, &lsquo;value1&rsquo;], [&lsquo;key2&rsquo;, &lsquo;value2&rsquo;]]</td></tr><tr><td class=CDLEntry>(String) text</td><td class=CDLDescription>The text child data for the element.</td></tr></table><h4 class=CHeading>Returns</h4><p>A new XML DOM element.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.xmlTextNode"></a>xmlTextNode</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>xmlTextNode: function (</td><td class=PParameter nowrap>text</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates an XML DOM text node.</p><p>Provides a cross implementation version of document.createTextNode.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) text</td><td class=CDLDescription>The content of the text node.</td></tr></table><h4 class=CHeading>Returns</h4><p>A new XML DOM text node.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.getText"></a>getText</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getText: function (</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Get the concatenation of all text children of an element.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(XMLElement) elem</td><td class=CDLDescription>A DOM element.</td></tr></table><h4 class=CHeading>Returns</h4><p>A String with the concatenated text of all text element children.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.copyElement"></a>copyElement</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>copyElement: function (</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Copy an XML DOM element.</p><p>This function copies a DOM element and all its descendants and returns the new copy.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(XMLElement) elem</td><td class=CDLDescription>A DOM element.</td></tr></table><h4 class=CHeading>Returns</h4><p>A new, copied DOM element tree.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.escapeJid"></a>escapeJid</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>escapeJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Escape a JID.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) jid</td><td class=CDLDescription>A JID.</td></tr></table><h4 class=CHeading>Returns</h4><p>An escaped JID String.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.unescapeJid"></a>unescapeJid</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>unescapeJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Unescape a JID.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) jid</td><td class=CDLDescription>A JID.</td></tr></table><h4 class=CHeading>Returns</h4><p>An unescaped JID String.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.getNodeFromJid"></a>getNodeFromJid</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getNodeFromJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Get the node portion of a JID String.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) jid</td><td class=CDLDescription>A JID.</td></tr></table><h4 class=CHeading>Returns</h4><p>A String containing the node.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.getDomainFromJid"></a>getDomainFromJid</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getDomainFromJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Get the domain portion of a JID String.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) jid</td><td class=CDLDescription>A JID.</td></tr></table><h4 class=CHeading>Returns</h4><p>A String containing the domain.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.getResourceFromJid"></a>getResourceFromJid</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getResourceFromJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Get the resource portion of a JID String.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) jid</td><td class=CDLDescription>A JID.</td></tr></table><h4 class=CHeading>Returns</h4><p>A String containing the resource.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.getBareJidFromJid"></a>getBareJidFromJid</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getBareJidFromJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Get the bare JID from a JID String.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) jid</td><td class=CDLDescription>A JID.</td></tr></table><h4 class=CHeading>Returns</h4><p>A String containing the bare JID.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.log"></a>log</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>log: function (</td><td class=PParameter nowrap>level,</td></tr><tr><td></td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>User overrideable logging function.</p><p>This function is called whenever the Strophe library calls any of the logging functions.&nbsp;  The default implementation of this function does nothing.&nbsp;  If client code wishes to handle the logging messages, it should override this with</p><blockquote><pre>Strophe.log = function (level, msg) {
  (user code here)
};</pre></blockquote><p>Please note that data sent and received over the wire is logged via Strophe.Connection.rawInput() and Strophe.Connection.rawOutput().</p><p>The different levels and their meanings are</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>DEBUG</td><td class=CDLDescription>Messages useful for debugging purposes.</td></tr><tr><td class=CDLEntry>INFO</td><td class=CDLDescription>Informational messages.&nbsp;  This is mostly information like &lsquo;disconnect was called&rsquo; or &lsquo;SASL auth succeeded&rsquo;.</td></tr><tr><td class=CDLEntry>WARN</td><td class=CDLDescription>Warnings about potential problems.&nbsp;  This is mostly used to report transient connection errors like request timeouts.</td></tr><tr><td class=CDLEntry>ERROR</td><td class=CDLDescription>Some error occurred.</td></tr><tr><td class=CDLEntry>FATAL</td><td class=CDLDescription>A non-recoverable fatal error occurred.</td></tr></table><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(Integer) level</td><td class=CDLDescription>The log level of the log message.&nbsp;  This will be one of the values in Strophe.LogLevel.</td></tr><tr><td class=CDLEntry>(String) msg</td><td class=CDLDescription>The log message.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.debug"></a>debug</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>debug: function(</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Log a message at the Strophe.LogLevel.DEBUG level.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) msg</td><td class=CDLDescription>The log message.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.info"></a>info</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>info: function (</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Log a message at the Strophe.LogLevel.INFO level.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) msg</td><td class=CDLDescription>The log message.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.warn"></a>warn</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>warn: function (</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Log a message at the Strophe.LogLevel.WARN level.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) msg</td><td class=CDLDescription>The log message.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.error"></a>error</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>error: function (</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Log a message at the Strophe.LogLevel.ERROR level.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) msg</td><td class=CDLDescription>The log message.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.fatal"></a>fatal</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>fatal: function (</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Log a message at the Strophe.LogLevel.FATAL level.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) msg</td><td class=CDLDescription>The log message.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.serialize"></a>serialize</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>serialize: function (</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Render a DOM element and all descendants to a String.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(XMLElement) elem</td><td class=CDLDescription>A DOM element.</td></tr></table><h4 class=CHeading>Returns</h4><p>The serialized element tree as a String.</p></div></div></div>

<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="Strophe.Builder"></a>Strophe.<wbr>Builder</h2><div class=CBody><p>XML DOM builder.</p><p>This object provides an interface similar to JQuery but for building DOM element easily and rapidly.&nbsp;  All the functions except for toString() and tree() return the object, so calls can be chained.&nbsp;  Here&rsquo;s an example using the $iq() builder helper.</p><blockquote><pre>$iq({to: 'you': from: 'me': type: 'get', id: '1'})
    .c('query', {xmlns: 'strophe:example'})
    .c('example')
    .toString()</pre></blockquote><p>The above generates this XML fragment</p><blockquote><pre>&lt;iq to='you' from='me' type='get' id='1'&gt;
  &lt;query xmlns='strophe:example'&gt;
    &lt;example/&gt;
  &lt;/query&gt;
&lt;/iq&gt;</pre></blockquote><p>The corresponding DOM manipulations to get a similar fragment would be a lot more tedious and probably involve several helper variables.</p><p>Since adding children makes new operations operate on the child, up() is provided to traverse up the tree.&nbsp;  To add two children, do</p><blockquote><pre>builder.c('child1', ...).up().c('child2', ...)</pre></blockquote><p>The next operation on the Builder will be relative to the second child.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#Strophe.Builder.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Builder.Strophe.Builder" id=link63 onMouseOver="ShowTip(event, 'tt24', 'link63')" onMouseOut="HideTip('tt24')">Strophe.<wbr>Builder</a></td><td class=SDescription>Create a Strophe.Builder object.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.Builder.tree" id=link64 onMouseOver="ShowTip(event, 'tt25', 'link64')" onMouseOut="HideTip('tt25')">tree</a></td><td class=SDescription>Return the DOM tree.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Builder.toString" id=link65 onMouseOver="ShowTip(event, 'tt26', 'link65')" onMouseOut="HideTip('tt26')">toString</a></td><td class=SDescription>Serialize the DOM tree to a String.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.Builder.up" id=link66 onMouseOver="ShowTip(event, 'tt27', 'link66')" onMouseOut="HideTip('tt27')">up</a></td><td class=SDescription>Make the current parent element the new current element.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Builder.attrs" id=link67 onMouseOver="ShowTip(event, 'tt28', 'link67')" onMouseOut="HideTip('tt28')">attrs</a></td><td class=SDescription>Add or modify attributes of the current element.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.Builder.c" id=link68 onMouseOver="ShowTip(event, 'tt29', 'link68')" onMouseOut="HideTip('tt29')">c</a></td><td class=SDescription>Add a child to the current element and make it the new current element.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Builder.cnode" id=link69 onMouseOver="ShowTip(event, 'tt30', 'link69')" onMouseOut="HideTip('tt30')">cnode</a></td><td class=SDescription>Add a child to the current element and make it the new current element.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.Builder.t" id=link70 onMouseOver="ShowTip(event, 'tt31', 'link70')" onMouseOut="HideTip('tt31')">t</a></td><td class=SDescription>Add a child text element.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Strophe.Builder.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Builder.Strophe.Builder"></a>Strophe.<wbr>Builder</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>Strophe.Builder = function (</td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create a Strophe.Builder object.</p><p>The attributes should be passed in object notation.&nbsp;  For example</p><blockquote><pre>var b = new Builder('message', {to: 'you', from: 'me'});</pre></blockquote><p>or</p><blockquote><pre>var b = new Builder('messsage', {'xml:lang': 'en'});</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) name</td><td class=CDLDescription>The name of the root element.</td></tr><tr><td class=CDLEntry>(Object) attrs</td><td class=CDLDescription>The attributes for the root element in object notation.</td></tr></table><h4 class=CHeading>Returns</h4><p>A new Strophe.Builder.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Builder.tree"></a>tree</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>tree: function ()</td></tr></table></blockquote><p>Return the DOM tree.</p><p>This function returns the current DOM tree as an element object.&nbsp;  This is suitable for passing to functions like Strophe.Connection.send().</p><h4 class=CHeading>Returns</h4><p>The DOM tree as a element object.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Builder.toString"></a>toString</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>toString: function ()</td></tr></table></blockquote><p>Serialize the DOM tree to a String.</p><p>This function returns a string serialization of the current DOM tree.&nbsp;  It is often used internally to pass data to a Strophe.Request object.</p><h4 class=CHeading>Returns</h4><p>The serialized DOM tree in a String.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Builder.up"></a>up</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>up: function ()</td></tr></table></blockquote><p>Make the current parent element the new current element.</p><p>This function is often used after c() to traverse back up the tree.&nbsp; For example, to add two children to the same element</p><blockquote><pre>builder.c('child1', {}).up().c('child2', {});</pre></blockquote><h4 class=CHeading>Returns</h4><p>The Stophe.Builder object.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Builder.attrs"></a>attrs</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>attrs: function (</td><td class=PParameter nowrap>moreattrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Add or modify attributes of the current element.</p><p>The attributes should be passed in object notation.&nbsp;  This function does not move the current element pointer.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(Object) moreattrs</td><td class=CDLDescription>The attributes to add/modify in object notation.</td></tr></table><h4 class=CHeading>Returns</h4><p>The Strophe.Builder object.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Builder.c"></a>c</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>c: function (</td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Add a child to the current element and make it the new current element.</p><p>This function moves the current element pointer to the child.&nbsp;  If you need to add another child, it is necessary to use up() to go back to the parent in the tree.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) name</td><td class=CDLDescription>The name of the child.</td></tr><tr><td class=CDLEntry>(Object) attrs</td><td class=CDLDescription>The attributes of the child in object notation.</td></tr></table><h4 class=CHeading>Returns</h4><p>The Strophe.Builder object.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Builder.cnode"></a>cnode</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>cnode: function (</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Add a child to the current element and make it the new current element.</p><p>This function is the same as c() except that instead of using a name and an attributes object to create the child it uses an existing DOM element object.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(XMLElement) elem</td><td class=CDLDescription>A DOM element.</td></tr></table><h4 class=CHeading>Returns</h4><p>The Strophe.Builder object.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Builder.t"></a>t</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>t: function (</td><td class=PParameter nowrap>text</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Add a child text element.</p><p>This <b>does not</b> make the child the new current element since there are no children of text elements.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) text</td><td class=CDLDescription>The text data to append to the current element.</td></tr></table><h4 class=CHeading>Returns</h4><p>The Strophe.Builder object.</p></div></div></div>

<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="Strophe.Connection"></a>Strophe.<wbr>Connection</h2><div class=CBody><p>XMPP Connection manager.</p><p>Thie class is the main part of Strophe.&nbsp;  It manages a BOSH connection to an XMPP server and dispatches events to the user callbacks as data arrives.&nbsp;  It supports SASL PLAIN, SASL DIGEST-MD5, and legacy authentication.</p><p>After creating a Strophe.Connection object, the user will typically call connect() with a user supplied callback to handle connection level events like authentication failure, disconnection, or connection complete.</p><p>The user will also have several event handlers defined by using addHandler() and addTimedHandler().&nbsp;  These will allow the user code to respond to interesting stanzas or do something periodically with the connection.&nbsp;  These handlers will be active once authentication is finished.</p><p>To send data to the connection, use send().</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#Strophe.Connection.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Connection.Strophe.Connection" id=link71 onMouseOver="ShowTip(event, 'tt32', 'link71')" onMouseOut="HideTip('tt32')">Strophe.<wbr>Connection</a></td><td class=SDescription>Create and initialize a Strophe.Connection object.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.Connection.reset" id=link72 onMouseOver="ShowTip(event, 'tt33', 'link72')" onMouseOut="HideTip('tt33')">reset</a></td><td class=SDescription>Reset the connection.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Connection.getUniqueId" id=link73 onMouseOver="ShowTip(event, 'tt34', 'link73')" onMouseOut="HideTip('tt34')">getUniqueId</a></td><td class=SDescription>Generate a unique ID for use in &lt;iq/&gt; elements.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.Connection.connect" id=link74 onMouseOver="ShowTip(event, 'tt35', 'link74')" onMouseOut="HideTip('tt35')">connect</a></td><td class=SDescription>Starts the connection process.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Connection.rawInput" id=link75 onMouseOver="ShowTip(event, 'tt36', 'link75')" onMouseOut="HideTip('tt36')">rawInput</a></td><td class=SDescription>User overrideable function that receives raw data coming into the connection.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.Connection.rawOutput" id=link76 onMouseOver="ShowTip(event, 'tt37', 'link76')" onMouseOut="HideTip('tt37')">rawOutput</a></td><td class=SDescription>User overrideable function that receives raw data sent to the connection.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Connection.send" id=link77 onMouseOver="ShowTip(event, 'tt38', 'link77')" onMouseOut="HideTip('tt38')">send</a></td><td class=SDescription>Send a stanza.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.Connection.addTimedHandler" id=link78 onMouseOver="ShowTip(event, 'tt39', 'link78')" onMouseOut="HideTip('tt39')">addTimedHandler</a></td><td class=SDescription>Add a timed handler to the connection.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Connection.deleteTimedHandler" id=link79 onMouseOver="ShowTip(event, 'tt40', 'link79')" onMouseOut="HideTip('tt40')">deleteTimedHandler</a></td><td class=SDescription>Delete a timed handler for a connection.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.Connection.addHandler" id=link80 onMouseOver="ShowTip(event, 'tt41', 'link80')" onMouseOut="HideTip('tt41')">addHandler</a></td><td class=SDescription>Add a stanza handler for the connection.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Strophe.Connection.deleteHandler" id=link81 onMouseOver="ShowTip(event, 'tt42', 'link81')" onMouseOut="HideTip('tt42')">deleteHandler</a></td><td class=SDescription>Delete a stanza handler for a connection.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#Strophe.Connection.disconnect" id=link82 onMouseOver="ShowTip(event, 'tt43', 'link82')" onMouseOut="HideTip('tt43')">disconnect</a></td><td class=SDescription>Start the graceful disconnection process.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.Strophe.Connection"></a>Strophe.<wbr>Connection</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>Strophe.Connection = function (</td><td class=PParameter nowrap>service</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create and initialize a Strophe.Connection object.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) service</td><td class=CDLDescription>The BOSH service URL.</td></tr></table><h4 class=CHeading>Returns</h4><p>A new Strophe.Connection object.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.reset"></a>reset</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>reset: function ()</td></tr></table></blockquote><p>Reset the connection.</p><p>This function should be called after a connection is disconnected before that connection is reused.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.getUniqueId"></a>getUniqueId</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getUniqueId: function (</td><td class=PParameter nowrap>suffix</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Generate a unique ID for use in &lt;iq/&gt; elements.</p><p>All &lt;iq/&gt; stanzas are required to have unique id attributes.&nbsp;  This function makes creating these easy.&nbsp;  Each connection instance has a counter which starts from zero, and the value of this counter plus a colon followed by the suffix becomes the unique id.&nbsp; If no suffix is supplied, the counter is used as the unique id.</p><p>Suffixes are used to make debugging easier when reading the stream data, and their use is recommended.&nbsp;  The counter resets to 0 for every new connection for the same reason.&nbsp;  For connections to the same server that authenticate the same way, all the ids should be the same, which makes it easy to see changes.&nbsp;  This is useful for automated testing as well.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) suffix</td><td class=CDLDescription>A optional suffix to append to the id.</td></tr></table><h4 class=CHeading>Returns</h4><p>A unique string to be used for the id attribute.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.connect"></a>connect</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>connect: function (</td><td class=PParameter nowrap>jid,</td></tr><tr><td></td><td class=PParameter nowrap>pass,</td></tr><tr><td></td><td class=PParameter nowrap>callback,</td></tr><tr><td></td><td class=PParameter nowrap>wait,</td></tr><tr><td></td><td class=PParameter nowrap>hold,</td></tr><tr><td></td><td class=PParameter nowrap>wind</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Starts the connection process.</p><p>As the connection process proceeds, the user supplied callback will be triggered multiple times with status updates.&nbsp;  The callback should take two arguments - the status code and the error condition.</p><p>The status code will be one of the values in the Strophe.Status constants.&nbsp;  The error condition will be one of the conditions defined in RFC 3920 or the condition &lsquo;strophe-parsererror&rsquo;.</p><p>Please see XEP 124 for a more detailed explanation of the optional parameters below.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) jid</td><td class=CDLDescription>The user&rsquo;s JID.&nbsp;  This may be a full JID.&nbsp;  If a resource is not supplied, it will default to &ldquo;strophe&rdquo;.</td></tr><tr><td class=CDLEntry>(String) pass</td><td class=CDLDescription>The user&rsquo;s password.&nbsp; (Function) callback The connect callback function.</td></tr><tr><td class=CDLEntry>(Integer) wait</td><td class=CDLDescription>The optional HTTPBIND wait value.&nbsp;  This is the time the server will wait before returning an empty result for a request.&nbsp;  The default setting of 60 seconds is recommended.&nbsp; Other settings will require tweaks to the Strophe.TIMEOUT value.</td></tr><tr><td class=CDLEntry>(Integer) hold</td><td class=CDLDescription>The optional HTTPBIND hold value.&nbsp;  This is the number of connections the server will hold at one time.&nbsp;  This should almost always be set to 1 (the default).</td></tr><tr><td class=CDLEntry>(Integer) wind</td><td class=CDLDescription>The optional HTTBIND window value.&nbsp;  This is the allowed range of request ids that are valid.&nbsp;  The default is 5.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.rawInput"></a>rawInput</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>rawInput: function (</td><td class=PParameter nowrap>data</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>User overrideable function that receives raw data coming into the connection.</p><p>The default function does nothing.&nbsp;  User code can override this with</p><blockquote><pre>Strophe.Connection.rawInput = function (data) {
  (user code)
};</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) data</td><td class=CDLDescription>The data received by the connection.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.rawOutput"></a>rawOutput</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>rawOutput: function (</td><td class=PParameter nowrap>data</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>User overrideable function that receives raw data sent to the connection.</p><p>The default function does nothing.&nbsp;  User code can override this with</p><blockquote><pre>Strophe.Connection.rawOutput = function (data) {
  (user code)
};</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(String) data</td><td class=CDLDescription>The data sent by the connection.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.send"></a>send</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>send: function (</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Send a stanza.</p><p>This function is called to push data onto the send queue to go out over the wire.&nbsp;  Whenever a request is sent to the BOSH server, all pending data is sent and the queue is flushed.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(XMLElement) elem</td><td class=CDLDescription>The stanza to send.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.addTimedHandler"></a>addTimedHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>addTimedHandler: function (</td><td class=PParameter nowrap>period,</td></tr><tr><td></td><td class=PParameter nowrap>handler</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Add a timed handler to the connection.</p><p>This function adds a timed handler.&nbsp;  The provided handler will be called every period milliseconds until it returns false, the connection is terminated, or the handler is removed.&nbsp;  Handlers that wish to continue being invoked should return true.</p><p>Because of method binding it is necessary to save the result of this function if you wish to remove a handler with deleteTimedHandler().</p><p>Note that user handlers are not active until authentication is successful.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(Integer) period</td><td class=CDLDescription>The period of the handler.</td></tr><tr><td class=CDLEntry>(Function) handler</td><td class=CDLDescription>The callback function.</td></tr></table><h4 class=CHeading>Returns</h4><p>A reference to the handler that can be used to remove it.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.deleteTimedHandler"></a>deleteTimedHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>deleteTimedHandler: function (</td><td class=PParameter nowrap>handRef</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Delete a timed handler for a connection.</p><p>This function removes a timed handler from the connection.&nbsp;  The handRef parameter is <b>not</b> the function passed to addTimedHandler(), but is the reference returned from addTimedHandler().</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(Strophe.TimedHandler) handRef</td><td class=CDLDescription>The handler reference.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.addHandler"></a>addHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>addHandler: function (</td><td class=PParameter nowrap>handler,</td></tr><tr><td></td><td class=PParameter nowrap>ns,</td></tr><tr><td></td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PParameter nowrap>id,</td></tr><tr><td></td><td class=PParameter nowrap>from</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Add a stanza handler for the connection.</p><p>This function adds a stanza handler to the connection.&nbsp;  The handler callback will be called for any stanza that matches the parameters.&nbsp;  Note that if multiple parameters are supplied, they must all match for the handler to be invoked.</p><p>The handler will receive the stanza that triggered it as its argument.&nbsp; The handler should return true if it is to be invoked again; returning false will remove the handler after it returns.</p><p>As a convenience, the ns parameters applies to the top level element and also any of its immediate children.&nbsp;  This is primarily to make matching /iq/query elements easy.</p><p>The return value should be saved if you wish to remove the handler with deleteHandler().</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(Function) handler</td><td class=CDLDescription>The user callback.</td></tr><tr><td class=CDLEntry>(String) ns</td><td class=CDLDescription>The namespace to match.</td></tr><tr><td class=CDLEntry>(String) name</td><td class=CDLDescription>The stanza name to match.</td></tr><tr><td class=CDLEntry>(String) type</td><td class=CDLDescription>The stanza type attribute to match.</td></tr><tr><td class=CDLEntry>(String) id</td><td class=CDLDescription>The stanza id attribute to match.</td></tr><tr><td class=CDLEntry>(String) from</td><td class=CDLDescription>The stanza from attribute to match.</td></tr></table><h4 class=CHeading>Returns</h4><p>A reference to the handler that can be used to remove it.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.deleteHandler"></a>deleteHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>deleteHandler: function (</td><td class=PParameter nowrap>handRef</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Delete a stanza handler for a connection.</p><p>This function removes a stanza handler from the connection.&nbsp;  The handRef parameter is <b>not</b> the function passed to addHandler(), but is the reference returned from addHandler().</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>(Strophe.Handler) handRef</td><td class=CDLDescription>The handler reference.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Strophe.Connection.disconnect"></a>disconnect</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>disconnect: function ()</td></tr></table></blockquote><p>Start the graceful disconnection process.</p><p>This function starts the disconnection process.&nbsp;  This process starts by sending unavailable presence and sending BOSH body of type terminate.&nbsp;  A timeout handler makes sure that disconnection happens even if the BOSH server does not respond.</p><p>The user supplied connection callback will be notified of the progress as this process happens.</p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MEntry><div class=MFile id=MSelected>strophe.js</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Files.html">Files</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Constants.html">Constants</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Constants">Constants</option><option value="Files">Files</option><option value="Functions">Functions</option></select></div></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function $build(</td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Create a Strophe.Builder. </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function $msg(</td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Create a Strophe.Builder with a message/ element as the root.</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function $iq(</td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Create a Strophe.Builder with an iq/ element as the root.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function $pres(</td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Create a Strophe.Builder with a presence/ element as the root.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>forEachChild: function (</td><td class=PParameter nowrap>elem,</td></tr><tr><td></td><td class=PParameter nowrap>elemName,</td></tr><tr><td></td><td class=PParameter nowrap>func</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Map a function over some or all child elements of a given element.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>isTagEqual: function (</td><td class=PParameter nowrap>el,</td></tr><tr><td></td><td class=PParameter nowrap>name</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Compare an element&rsquo;s tag name with a string.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>xmlElement: function (</td><td class=PParameter nowrap>name</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Create an XML DOM element.</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>xmlTextNode: function (</td><td class=PParameter nowrap>text</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates an XML DOM text node.</div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getText: function (</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Get the concatenation of all text children of an element.</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>copyElement: function (</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Copy an XML DOM element.</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>escapeJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Escape a JID.</div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>unescapeJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Unescape a JID.</div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getNodeFromJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Get the node portion of a JID String.</div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getDomainFromJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Get the domain portion of a JID String.</div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getResourceFromJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Get the resource portion of a JID String.</div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getBareJidFromJid: function (</td><td class=PParameter nowrap>jid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Get the bare JID from a JID String.</div></div><div class=CToolTip id="tt17"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>log: function (</td><td class=PParameter nowrap>level,</td></tr><tr><td></td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>User overrideable logging function.</div></div><div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>debug: function(</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Log a message at the Strophe.LogLevel.DEBUG level.</div></div><div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>info: function (</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Log a message at the Strophe.LogLevel.INFO level.</div></div><div class=CToolTip id="tt20"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>warn: function (</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Log a message at the Strophe.LogLevel.WARN level.</div></div><div class=CToolTip id="tt21"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>error: function (</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Log a message at the Strophe.LogLevel.ERROR level.</div></div><div class=CToolTip id="tt22"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>fatal: function (</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Log a message at the Strophe.LogLevel.FATAL level.</div></div><div class=CToolTip id="tt23"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>serialize: function (</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Render a DOM element and all descendants to a String.</div></div><div class=CToolTip id="tt24"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>Strophe.Builder = function (</td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Create a Strophe.Builder object.</div></div><div class=CToolTip id="tt25"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>tree: function ()</td></tr></table></blockquote>Return the DOM tree.</div></div><div class=CToolTip id="tt26"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>toString: function ()</td></tr></table></blockquote>Serialize the DOM tree to a String.</div></div><div class=CToolTip id="tt27"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>up: function ()</td></tr></table></blockquote>Make the current parent element the new current element.</div></div><div class=CToolTip id="tt28"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>attrs: function (</td><td class=PParameter nowrap>moreattrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Add or modify attributes of the current element.</div></div><div class=CToolTip id="tt29"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>c: function (</td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PParameter nowrap>attrs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Add a child to the current element and make it the new current element.</div></div><div class=CToolTip id="tt30"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>cnode: function (</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Add a child to the current element and make it the new current element.</div></div><div class=CToolTip id="tt31"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>t: function (</td><td class=PParameter nowrap>text</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Add a child text element.</div></div><div class=CToolTip id="tt32"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>Strophe.Connection = function (</td><td class=PParameter nowrap>service</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Create and initialize a Strophe.Connection object.</div></div><div class=CToolTip id="tt33"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>reset: function ()</td></tr></table></blockquote>Reset the connection.</div></div><div class=CToolTip id="tt34"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getUniqueId: function (</td><td class=PParameter nowrap>suffix</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Generate a unique ID for use in iq/ elements.</div></div><div class=CToolTip id="tt35"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>connect: function (</td><td class=PParameter nowrap>jid,</td></tr><tr><td></td><td class=PParameter nowrap>pass,</td></tr><tr><td></td><td class=PParameter nowrap>callback,</td></tr><tr><td></td><td class=PParameter nowrap>wait,</td></tr><tr><td></td><td class=PParameter nowrap>hold,</td></tr><tr><td></td><td class=PParameter nowrap>wind</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Starts the connection process.</div></div><div class=CToolTip id="tt36"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>rawInput: function (</td><td class=PParameter nowrap>data</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>User overrideable function that receives raw data coming into the connection.</div></div><div class=CToolTip id="tt37"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>rawOutput: function (</td><td class=PParameter nowrap>data</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>User overrideable function that receives raw data sent to the connection.</div></div><div class=CToolTip id="tt38"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>send: function (</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Send a stanza.</div></div><div class=CToolTip id="tt39"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>addTimedHandler: function (</td><td class=PParameter nowrap>period,</td></tr><tr><td></td><td class=PParameter nowrap>handler</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Add a timed handler to the connection.</div></div><div class=CToolTip id="tt40"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>deleteTimedHandler: function (</td><td class=PParameter nowrap>handRef</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Delete a timed handler for a connection.</div></div><div class=CToolTip id="tt41"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>addHandler: function (</td><td class=PParameter nowrap>handler,</td></tr><tr><td></td><td class=PParameter nowrap>ns,</td></tr><tr><td></td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PParameter nowrap>id,</td></tr><tr><td></td><td class=PParameter nowrap>from</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Add a stanza handler for the connection.</div></div><div class=CToolTip id="tt42"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>deleteHandler: function (</td><td class=PParameter nowrap>handRef</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Delete a stanza handler for a connection.</div></div><div class=CToolTip id="tt43"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>disconnect: function ()</td></tr></table></blockquote>Start the graceful disconnection process.</div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>